package com.lebang.entity;

import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDateTime;

/**
 * @Author: hwq
 * @Date: 2020/5/1 16:58
 * @Version 1.0
 */
@Data
@Document("black_request")
public class BlackRecord {
    private String appStore;
    private String brand;
    private String imei;
    private String macAddr;
    private String os;
    private String osv;
    private String userid;
    private String version;
    private String ipAddr;
    private String ua;
    private LocalDateTime createDateTime;

    public BlackRecord(RequestHeaders requestHeaders) {
        this.appStore = requestHeaders.getAppStore();
        this.brand=requestHeaders.getBrand();
        this.imei=requestHeaders.getImei();
        this.macAddr=requestHeaders.getMacAddr();
        this.os=requestHeaders.getOs();
        this.osv=requestHeaders.getOsv();
        this.userid=requestHeaders.getUserid();
        this.version=requestHeaders.getVersion();
        this.ipAddr=requestHeaders.getIpAddr();
        this.ua=requestHeaders.getUa();
        this.createDateTime= LocalDateTime.now();
    }
}
